Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash on saving the settings twice #10148

Merged
2 commits merged into from
May 21, 2021
Merged

Conversation

zadjii-msft
Copy link
Member

Summary of the Pull Request

Check for null before serializing the default terminal. Because the _currentDefaultTerminal is only initialized when the Launch page is navigated to, this could be null if you navigate to another page, save, then save again.

PR Checklist

Validation Steps Performed

It crashed consistently before, it doesn't now.

@ghost ghost added Area-Settings UI Anything specific to the SUI Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news. labels May 21, 2021
@zadjii-msft zadjii-msft requested a review from miniksa May 21, 2021 14:24
Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I get for being tricky and delaying the load. Thanks for covering for me.

src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp Outdated Show resolved Hide resolved
Co-authored-by: Michael Niksa <miniksa@microsoft.com>
@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label May 21, 2021
@DHowett
Copy link
Member

DHowett commented May 21, 2021

@msftbot merge this in 1 minute

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label May 21, 2021
@ghost
Copy link

ghost commented May 21, 2021

Hello @DHowett!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Fri, 21 May 2021 16:38:25 GMT, which is in 1 minute

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@ghost ghost merged commit 20a722c into main May 21, 2021
@ghost ghost deleted the dev/migrie/b/10003-sui-defterm-crash branch May 21, 2021 16:38
@ghost
Copy link

ghost commented May 25, 2021

🎉Windows Terminal Preview v1.9.1445.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings UI Anything specific to the SUI AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Second It's a PR that needs another sign-off Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash in main when writing settings to disk twice
3 participants